#@adminLayout()
#define main()
<div class="jbolt_page" data-key="#(pmkey)">
    <div class="jbolt_page_title">
        <div class="row">
            <div class="col-2">
                <h1>订单管理</h1>
                <span> #(pageData.totalRow?? 0) 条记录</span>
            </div>
            <div class="col-8" >
                <form class="form-inline"  id="retailerOrderForm" action="/auth/mall/order"  data-pjaxsubmit  method="get">
                    <select class="form-control"
                            name="retailerId"
                            id="retailerId"
                            data-autoload
                            data-url="/auth/mall/order/order_retailer_option"
                            data-text="请选择商家"
                            data-value=""
                            data-select="#(retailerId??)"
                    >
                    </select >
                    <select class="form-control ml-1"  data-url="/auth/mall/order/get_retailerOrder_Type" id="isType" name="isType" data-autoload data-text="=订单类型=" data-value="" data-select="#(isType??)"></select>
                    <select class="form-control ml-1"  data-url="/auth/mall/order/get_retailerOrder_time" id="onTime" name="onTime" data-autoload data-text="=下单时间=" data-value="" data-select="#(onTime??)"></select>
                    <input type="text" autocomplete="off"  class="form-control"  placeholder="输入关键字搜索" id="keywords" name="keywords" value="#(keywords??)" />
                    <button  type="submit" class="btn btn-light" ><i class="fa fa-search"></i> 查询</button>
                    <button    onclick="TestOrderreset()" data-handler="reloadCurrentPage" class="btn btn-light" ><i class="fa fa-refresh"></i> 重置</button>
                </form>
            </div>



        </div>
    </div>
    <div class="jbolt_page_content">
        <div class="table-responsive">
            <table class="table table-bordered table-hover table-striped table-center">
                <thead>
                <tr>
                    <th style="width: 60px">详情</th><th style="width:100px">联系人</th>
                    <th style="width: 200px">商家</th>
                    <th style="width: 100px">收货人</th>
                    <th style="width:100px">收货人<br>手机号码</th>
                    <th style="width:120px;">下单时间</th>
                    <th style="width:120px;">支付时间</th>
                    <th style="width:100px;">订单状态</th>
                    <th  style="width: 60px">分销商积分</th>
                    <th  style="width: 60px">总付</th>
                    <th  style="width: 60px">实付</th>
                    <th style="width:60px;">应付商家</th>
                    <th style="width:60px;">现金支付</th>
                    <th style="width:60px;">平台余额支付</th>
                    <th style="width:60px;">商家余额支付</th>
                    <th  style="width: 60px">券支付</th>
                    <th style="width:60px;">平台抽成</th>
                    <th style="width:60px">订单类型</th>
                </tr>
                </thead>
                <tbody>
                #if(pageData)
                #for(data:pageData.list)
                <tr>
                    <td><img src="assets/img/off.png" data-switchbtn  data-handler="toggleVisiable('#hidden_#(for.index+1)')"/></td>
                    <td>#(MyUtil.get_retailer_order_memberName(data.client_id??)??)</td>
                    <td>#(MyUtil.get_retailer_name(data.retailer_id??)??)</td>

                    <td>#(data.consignee??)</td>

                    <td>#(data.mobile??)</td>
                    <td>#(MyUtil.get_date(data.order_time??))</td>
                    <td>#(MyUtil.get_date(data.pay_time??))</td>
                    <td>#(MyUtil.get_retailer_order_statusString(data.status??))</td>
                    <td>#(MyUtil.get_price_string(data.credit??))</td>
                    <td>#(MyUtil.get_price_string(data.amount_total??))</td>
                    <td>#(MyUtil.get_price_string(data.amount_paid??))</td>
                    <td>#(MyUtil.get_price_string(data.retailer_amount??))</td>
                    <td>#(MyUtil.get_price_string(data.cash_amount??))</td>
                    <td>#(MyUtil.get_price_string(data.balance_amount??))</td>
                    <td>#(MyUtil.get_price_string(data.retailer_balance_amount??))</td>
                    <td>#(MyUtil.get_price_string(data.coupon_amount??))</td>
                    <td>#(MyUtil.get_price_string(data.commission??))</td>

                    <td>#(MyUtil.get_order_type_string(data.type??))</td>
                </tr>
                <tr>
                    <td colspan="20" style="display: none" id="hidden_#(for.index+1)">
                        #if(MyUtil.get_order_commodity_list(data.id??))
                            #for(order_commodity : MyUtil.get_order_commodity_list(data.id??))
                                <div class="row" style="margin-top: 10px">
                                    <div class="col-4" style="padding-left: 5%">
                                        <li >商品 : #(order_commodity.commodity_name)</li>
                                        <li >规格 : #(order_commodity.option_title)</li>
                                        <li >收货地址: #(data.address??)</li>

                                    </div>
                                    <div class="col-4">
                                        <li >商品数量:#(order_commodity.amount??)</li>
                                        <li >订单号:#(data.order_id??)</li>
                                        <li >交易号:#(data.TransactionId??)</li>

                                    </div>
                                    <div class="col-4">

                                        <li >支付方式:#(MyUtil.get_retailer_order_payTypeString(data.pay_type??))</li>
                                        <li >打印状态:#(MyUtil.get_retailer_order_printStatusString(data.print_status??))</li>
                                        <li >打印次数:#(data.printed_times)</li>
                                    </div>

                                </div>
                            #end
                        #end



                    </td>
                </tr>

                #end
                总付： #(MyUtil.get_price_string(total_amount_total??)?? 0)
                实付： #(MyUtil.get_price_string(total_amount_paid??)?? 0)
                应付商家：#(MyUtil.get_price_string(total_retailer_amount??)?? 0)
                #end


                </tbody>
            </table>
        </div>
        #include("/_view/_admin/common/_page.html",pageEleId="retailerOrderPage")
    </div>
</div>
#end
#define js()
<script>

    $(function(){
        initPage("retailerOrderPage",#(pageData.totalPage??),#(pageData.pageNumber??),"retailerOrderForm");
    });


    function TestOrderreset() {

        document.getElementById("isType").value = "";
        document.getElementById("retailerId").value = "";
        document.getElementById("keywords").value = "";
        document.getElementById("onTime").value = "";
    }


</script>
#end

